﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="ViewHFCustomerLoanInfo.aspx.cs" Inherits="Admin_home_refinance_ViewHFCustomerLoanInfo"
    Title="Home Loan - Customer Infomation" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="contents">
    <table width="100%" cellpadding="3" cellspacing="0" border="0">
        <tr>
            <td colspan="2">
                <h1>View Home Loan Customer Information</h1>
            </td>
        </tr>
        <tr>
            <td height="30" width="80">
                Posted Date :
            </td>
            <td>
                <asp:TextBox ID="txtPostedDate" runat="server"></asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" Text="Submit" OnClick="btnSearch_Click" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="gvCustomerInfo" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                    Cellspacing="5" CellPadding="5" DataKeyNames="HFID" DataSourceID="sqlDsHFCustomerInfo"  Width="100%" CssClass="admin_gridstyle"
                    GridLines="None" EmptyDataText="No customer record." OnSelectedIndexChanged="gvCustomerInfo_SelectedIndexChanged">
                    <Columns>
                        <asp:BoundField DataField="HFID" HeaderText="HFID" InsertVisible="False" ReadOnly="True"
                            SortExpression="HFID" Visible="False" />
                        <asp:BoundField DataField="HFLoanPurpose" HeaderText="HFLoanPurpose" ReadOnly="True"
                            SortExpression="HFLoanPurpose" />
                        <asp:BoundField DataField="HFPropertyType" HeaderText="HFPropertyType" ReadOnly="True"
                            SortExpression="HFPropertyType" />
                        <asp:BoundField DataField="HFAmount" HeaderText="HFAmount" SortExpression="HFAmount" />
                        <asp:BoundField DataField="HFInterestRateType" HeaderText="HFInterestRateType" ReadOnly="True"
                            SortExpression="HFInterestRateType" />
                        <asp:BoundField DataField="HFName" HeaderText="HFName" SortExpression="HFName" />
                        <asp:BoundField DataField="HFMortage" HeaderText="HFMortage" SortExpression="HFMortage" />
                        <asp:BoundField DataField="CreatedDate" HeaderText="CreatedDate" SortExpression="CreatedDate" />
                        <asp:CommandField SelectText="View Details" ShowSelectButton="True" />
                    </Columns>
                    <FooterStyle />
                    <PagerStyle />
                    <SelectedRowStyle />
                    <HeaderStyle CssClass="admin_gridheader" />
                    <EditRowStyle />
                    <AlternatingRowStyle CssClass="admin_gridodd" />
                    <RowStyle CssClass="admin_grideven" />
                </asp:GridView>
                <asp:SqlDataSource ID="sqlDsHFCustomerInfo" runat="server" ConnectionString="<%$ ConnectionStrings:CX_DBConnectionString %>"
                    SelectCommand="sprocHFLoanSelectItemListView" SelectCommandType="StoredProcedure">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="txtPostedDate" Name="PostedDate" PropertyName="Text"
                            Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <h2>Customer Require Loan Details</h2>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:HyperLink ID="hplViewAppDetails" runat="server" Target="_blank">[View 
                Application Details]</asp:HyperLink>
                &nbsp;
                <asp:HyperLink ID="hplViewPropertyDetails" runat="server" Target="_blank">[View 
                Property Details]</asp:HyperLink>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:DetailsView ID="dvCustomerInfoDetail" runat="server" DataSourceID="sqlDsCustomerInfoDetails"
                    CellSpacing="1" Width="100%" AutoGenerateRows="False" CellPadding="3" DataKeyNames="HFID"
                    EmptyDataText="Please select one customer record to view details." ForeColor="#333333" BackColor="#ffffff"
                    GridLines="None" BorderStyle="Solid" BorderColor="#eff7fa" BorderWidth="1px">
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
                    <RowStyle BackColor="#fbfeff" ForeColor="#333333" />
                    <FieldHeaderStyle BackColor="#eff7fa" Font-Bold="True" Width="200px" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <Fields>
                        <asp:BoundField DataField="HFLoanPurpose" HeaderText="HFLoanPurpose" ReadOnly="True"
                            SortExpression="HFLoanPurpose" />
                        <asp:BoundField DataField="HFPropertyType" HeaderText="HFPropertyType" ReadOnly="True"
                            SortExpression="HFPropertyType" />
                        <asp:BoundField DataField="HFPropertyStatus" HeaderText="HFPropertyStatus" ReadOnly="True"
                            SortExpression="HFPropertyStatus" />
                        <asp:BoundField DataField="HFPropertyValue" HeaderText="HFPropertyValue" SortExpression="HFPropertyValue" />
                        <asp:BoundField DataField="HFAmount" HeaderText="HFAmount" SortExpression="HFAmount" />
                        <asp:BoundField DataField="HFLoanTenure" HeaderText="HFLoanTenure" SortExpression="HFLoanTenure" />
                        <asp:BoundField DataField="HFInterestRateType" HeaderText="HFInterestRateType" ReadOnly="True"
                            SortExpression="HFInterestRateType" />
                        <asp:BoundField DataField="HFLockInPeroid" HeaderText="HFLockInPeroid" SortExpression="HFLockInPeroid" />
                        <asp:BoundField DataField="HFName" HeaderText="HFName" SortExpression="HFName" />
                        <asp:BoundField DataField="HFPhoneNo" HeaderText="HFPhoneNo" SortExpression="HFPhoneNo" />
                        <asp:BoundField DataField="HFEmailAddress" HeaderText="HFEmailAddress" SortExpression="HFEmailAddress" />
                        <asp:CheckBoxField DataField="HFMortage" HeaderText="HFMortage" SortExpression="HFMortage" />
                    </Fields>
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#999999" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:DetailsView>
                <asp:SqlDataSource ID="sqlDsCustomerInfoDetails" runat="server" ConnectionString="<%$ ConnectionStrings:CX_DBConnectionString %>"
                    SelectCommand="sprocHFLoanSelectSingleItemView" SelectCommandType="StoredProcedure">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="gvCustomerInfo" Name="HFID" PropertyName="SelectedValue"
                            Type="Int64" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
    </div>
</asp:Content>
